package com.jindy.module.statement.service.impl;

import java.util.List;
import com.jindy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jindy.module.statement.mapper.StatementApprovalMapper;
import com.jindy.module.statement.domain.StatementApproval;
import com.jindy.module.statement.service.IStatementApprovalService;

/**
 * 对账单审批Service业务层处理
 * 
 * @author jindy
 * @date 2023-03-18
 */
@Service
public class StatementApprovalServiceImpl implements IStatementApprovalService 
{
    @Autowired
    private StatementApprovalMapper statementApprovalMapper;

    /**
     * 查询对账单审批
     * 
     * @param id 对账单审批主键
     * @return 对账单审批
     */
    @Override
    public StatementApproval selectStatementApprovalById(Long id)
    {
        return statementApprovalMapper.selectStatementApprovalById(id);
    }

    /**
     * 查询对账单审批列表
     * 
     * @param statementApproval 对账单审批
     * @return 对账单审批
     */
    @Override
    public List<StatementApproval> selectStatementApprovalList(StatementApproval statementApproval)
    {
        return statementApprovalMapper.selectStatementApprovalList(statementApproval);
    }

    /**
     * 新增对账单审批
     * 
     * @param statementApproval 对账单审批
     * @return 结果
     */
    @Override
    public int insertStatementApproval(StatementApproval statementApproval)
    {
        statementApproval.setCreateTime(DateUtils.getNowDate());
        return statementApprovalMapper.insertStatementApproval(statementApproval);
    }

    /**
     * 修改对账单审批
     * 
     * @param statementApproval 对账单审批
     * @return 结果
     */
    @Override
    public int updateStatementApproval(StatementApproval statementApproval)
    {
        statementApproval.setUpdateTime(DateUtils.getNowDate());
        return statementApprovalMapper.updateStatementApproval(statementApproval);
    }

    /**
     * 批量删除对账单审批
     * 
     * @param ids 需要删除的对账单审批主键
     * @return 结果
     */
    @Override
    public int deleteStatementApprovalByIds(Long[] ids)
    {
        return statementApprovalMapper.deleteStatementApprovalByIds(ids);
    }

    /**
     * 删除对账单审批信息
     * 
     * @param id 对账单审批主键
     * @return 结果
     */
    @Override
    public int deleteStatementApprovalById(Long id)
    {
        return statementApprovalMapper.deleteStatementApprovalById(id);
    }
}
